package com.wei.service_msm.util;

import java.text.DecimalFormat;
import java.util.Random;

/**
 * @author wjx
 * @ClassName RandomUtil
 * @description: TODO
 * @date 2022-12-03 08:45
 * @version: 1.0
 */
public class RandomUtil {
    private static final Random random = new Random();
    private static final DecimalFormat fourdf = new DecimalFormat("0000");
    private static final DecimalFormat sixdf = new DecimalFormat("000000");

    public static String getFourBitRandom() {
        return fourdf.format(random.nextInt(10000));
    }

    public static String getSixBitRandom() {
        return sixdf.format(random.nextInt(1000000));
    }
}
